/*
sort.c
offer kinds of sort function realize
designed by lunanting

-----------------------
2020-09-14 09:32:24
create file
-----------------------
*/


/*
bubble sort for int
冒泡排序  整数
小---->大
param:
    data:data pointer
    len:data lenght
*/
void xp_sort_bubblei(int *data,int len){
    int x,i,j;
    for(i=0;i<len;i++){
        for(j=0;j<len-i-1;j++){
            if(*(data+j)>*(data+j+1)){
                x=*(data+j+1);
                *(data+j+1)=*(data+j);
                *(data+j)=x;
            }
        }
    }
}





//end of the file
